

/* int * int */
ENTRY(__mulsi3)
#ifndef __mc68010__
	movel	4(%sp),%d0
	mulsl	8(%sp),%d0
#else
| NB: this requires that __udivsi3 preserve %a0 and return
| the modulus in %d1:
	movew	6(%sp), %d0
	movel	%d0, %a0	| save B
	muluw	8(%sp), %d0	| %d0 holds B * C
	movew	10(%sp), %d1
	movel	%d1, %a1	| save D
	muluw	4(%sp), %d1	| %d1 holds A * D
	addw	%d1, %d0	| %d0 holds (B * C) + (A * D)
	swap	%d0
	clrw	%d0		| %d0 holds ((B * C) + (A * D)) << 16
	exg	%a0, %d0	| restore B
	movel	%a1, %d1	| restore D
	muluw	%d1, %d0	| %d0 holds B * D
	addl	%a0, %d0	| final result
#endif /* __mc68010__ */
	rts
END(__mulsi3)
